home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / amiga / opalvisn / jopalif.lha / opallib.j < prev    next >
Text File  |  1992-12-31  |  5KB  |  187 lines

  1. \ Opallib.j
  2.  
  3. \ Opal Library Includes File For JForth 3.0.
  4.  
  5. \ Version 1.0
  6.  
  7. \ 22 December 1992
  8.  
  9. \ By Marlin Schwanke
  10.  
  11. \ InterNet marlins@crash.cts.com
  12. \ GEnie M.SCHWANKE
  13. \ FIDO 1:202/1111
  14.  
  15. EXISTS? LIBRARIES_OPAL_H NOT .IF
  16. 1   constant LIBRARIES_OPAL_H
  17.  
  18. EXISTS? EXEC_TYPES_H NOT .IF
  19. include ji:exec/types.j
  20. .THEN
  21.  
  22. EXISTS? LIBRARIES_DOS_H NOT .IF
  23. include ji:libraries/dos.j
  24. .THEN
  25.  
  26. decimal
  27. 290 constant MAXCOPROINS   ( Number of CoPro instructions )
  28.  
  29. hex
  30. \ Screen Flags
  31. 1     constant HIRES24        ( High resolution screen. )
  32. 2     constant ILACE24        ( Interlaced screen. )
  33. 4     constant OVERSCAN24     ( Overscan screen. )
  34. 8     constant NTSC24         ( NTSC Screen - Not user definable )
  35. 10    constant CLOSEABLE24    ( Screen is closeable. )
  36. 20    constant PLANES8        ( Screen has 8 bitplanes. )
  37. 40    constant PLANES15       ( Screen has 15 bitplanes. )
  38. 2000  constant CONTROLONLY24    ( Used for updating control bits only. )
  39. 4000  constant PALMAP24       ( Screen is in palette mapped mode. )
  40. 8000  constant INCHIP24       ( In chip ram - Not user definable. )
  41. CONTROLONLY24 PALMAP24 | CLOSEABLE24 | PLANES8 |
  42. PLANES15 | OVERSCAN24 | ILACE24 | HIRES24 |
  43. constant FLAGSMASK24
  44.  
  45. \ LoadIFF24 Flags
  46. 1  constant FORCE24           ( Force conversion of palette mapped to 24 bit. )
  47. 2  constant KEEPRES24         ( Keep the current screen resolution. )
  48. 4  constant LOADMASK24        ( Load mask plane if it exists. )
  49. 8  constant VIRTUALSCREEN24   ( Load complete image into fast ram. )
  50.  
  51. \ SaveIFF24 Flags
  52. 1  constant OVFASTFORMAT   ( Save as opalvision fast format. )
  53. 4  constant NOTHUMBNAIL    ( Inhibit thumbnail chunk. )
  54. 8  constant SAVEMASK24     ( Save MaskPlane with image. )
  55.  
  56. \ Config Flags
  57. 1  constant OVCF_OPALVISION   ( Display board is an OpalVision. )
  58. 2  constant OVCF_COLORBURST    ( Display board is a ColorBurst. )
  59.  
  60. hex
  61. \ Coprocessor bits.
  62. 1  constant VIDMODE0          \ Video control bit 1 (S0)
  63. 2  constant VIDMODE1          \ Video control bit 1 (S1)
  64. 4  constant DISPLAYBANK2    \ Select display bank 2
  65. 8  constant HIRESDISP       \ Enable hi-res display
  66. 10 constant DUALDISPLAY       \ Select dual display mode (active low)
  67. 20 constant OVPRI              \ Set OpalVision priority
  68. 40 constant PRISTENCIL       \ Enable priority stencil
  69. 80 constant ADDLOAD           \ Address load bit. Active low
  70. 0  constant VIDMODE0_B
  71. 1  constant VIDMODE1_B
  72. 2  constant DISPLAYBANK2_B
  73. 3  constant HIRESDISP_B
  74. 4  constant DUALDISPLAY_B
  75. 5  constant OVPRI_B
  76. 6  constant PRISTENCIL_B
  77. 7  constant ADDLOAD_B
  78.  
  79. hex
  80. \ Control line bits
  81. 1     constant VALID0
  82. 2     constant VALID1
  83. 4     constant VALID2
  84. 8     constant VALID3
  85. 10    constant WREN
  86. 20    constant COL_COPRO
  87. 40    constant AUTO
  88. 80    constant DUALPLAYFIELD
  89. 100   constant FIELD
  90. 200   constant AUTOFIELD
  91. 400   constant DISPLAYLATCH
  92. 800   constant FRAMEGRAB
  93. 1000  constant RWR1
  94. 2000  constant RWR2
  95. 4000  constant GWR1
  96. 8000  constant GWR2
  97. 10000 constant BWR1
  98. 20000 constant BWR2
  99. 40000 constant VLSIPROG
  100. 80000 constant FREEZEFRAME
  101. decimal
  102. 0  constant VALID0_B
  103. 1  constant VALID1_B
  104. 2  constant VALID2_B
  105. 3  constant VALID3_B
  106. 4  constant WREN_B
  107. 5  constant COL_COPRO_B
  108. 6  constant AUTO_B
  109. 7  constant DUALPLAYFIELD_B
  110. 8  constant FIELD_B
  111. 9  constant AUTOFIELD_B
  112. 10 constant DISPLAYLATCH_B
  113. 11 constant FRAMEGRAB_B
  114. 12 constant RWR1_B
  115. 13 constant RWR2_B
  116. 14 constant GWR1_B
  117. 15 constant GWR2_B
  118. 16 constant BWR1_B
  119. 17 constant BWR2_B
  120. 18 constant VLSIPROG_B
  121. 19 constant FREEZEFRAME_B
  122. 20 constant NUMCONTROLBITS
  123. 5  constant VALIDCODE
  124.  
  125. decimal
  126. \ Opal Screen Structure
  127. :STRUCT OpalScreen
  128.       ( %M JForth prefix ) SHORT os_Width
  129.    SHORT os_Height
  130.    SHORT os_Depth
  131.     SHORT os_ClipX1
  132.    SHORT os_ClipY1
  133.    SHORT os_ClipX2
  134.    SHORT os_ClipY2
  135.    SHORT os_BytesPerLine
  136.    USHORT os_Flags
  137.    SHORT os_RelX
  138.    SHORT os_RelY
  139.    APTR os_UserPort
  140.    SHORT os_MaxFrames
  141.    SHORT os_VStart
  142.    SHORT os_CoProOffset
  143.    SHORT os_LastWait
  144.    USHORT os_LastCoProIns
  145.    24 4 *  BYTES os_BitPlanes
  146.    APTR os_MaskPlane
  147.    ULONG os_AddressReg
  148.    UBYTE os_UpdateDelay
  149.    UBYTE os_PalLoadAddress
  150.    UBYTE os_PixelReadMask
  151.    UBYTE os_CommandReg
  152.    3 256 * BYTES os_Palette
  153.    UBYTE os_Pen_R
  154.    UBYTE os_Pen_G
  155.    UBYTE os_Pen_B
  156.    UBYTE os_Red
  157.    UBYTE os_Green
  158.    UBYTE os_Blue
  159.    MAXCOPROINS BYTES os_CoProData
  160.    SHORT os_Modulo
  161.    38 BYTES os_Reserved
  162. EXISTS? OPAL_PRIVATE .IF
  163.    12 4 *  BYTES os_CopList_Cycle
  164.    UBYTE os_Update_Cycles
  165.    UBYTE os_Pad
  166. .THEN
  167. ;STRUCT
  168.  
  169. decimal
  170. \ Opal Library Error Codes
  171. 1 constant OL_ERR_OUTOFMEM
  172. 2 constant OL_ERR_OPENFILE
  173. 3 constant OL_ERR_NOTIFF
  174. 3 constant OL_ERR_FORMATUNKNOWN
  175. 4 constant OL_ERR_NOTILBM
  176. 5 constant OL_ERR_FILEREAD
  177. 6 constant OL_ERR_FILEWRITE
  178. 7 constant OL_ERR_BADIFF
  179. 8 constant OL_ERR_CANTCLOSE
  180. 9 constant OL_ERR_OPENSCREEN
  181. 10 constant OL_ERR_NOTHUMBNAIL
  182. 11 constant OL_ERR_BADJPEG
  183. 12 constant OL_ERR_UNSUPPORTED
  184. 13 constant OL_ERR_CTRLC
  185. 40 constant OL_ERR_MAXERR
  186.  
  187.